[APP-2415] Full transition to CSS Logical Properties to improve RTL#515
Merged
Conversation
matviy-yermakov
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ PR Description
1. Problem & Context
Comprehensive RTL support requires replacing physical CSS properties (left/right/top/bottom, margin-left/right, padding-left/right) with logical equivalents (start/end, block/inline). This enables automatic mirroring for RTL locales without conditional styling or layout shifts.
2. What Changed (Where)
Core files: Replaced directional properties across ~100+ JS/CSS files. Key pattern:
marginRight→marginInlineEnd,borderTop→borderBlockStart,left: 0→inset: 0,padding-bottom→padding-block-end.Infrastructure: Added
@mui/systemdependency forRtlProviderwrapper in pie-chart. AddedRotatecomponent for icon rotation instead of inlinesx={{ rotate }}.Logic: Extracted RTL detection (
usePluginSettingsContext().isRTL) and passedhorizontalOrigin/TooltipPlacementdynamically to positioning components (popover, tooltips, sidebar).Banners: Split compound conditions (
!isOpen || viewedBanner→ separate checks) and removed redundant RTL selectors (html[dir="rtl"]).3. How It Works
RTL flows through context provider → components read
isRTLflag → compute logical direction props (TooltipPlacement = isRTL ? 'left' : 'right') → passed to MUI components respectingdir="rtl"on root. CSS logical properties auto-flip without JS intervention. No layout recalc needed.4. Risks
Minor: Icon rotation via
Rotatecomponent adds overhead vs inline transform (negligible). Testing gap: RTL rendering untested in preview; recommend verifying pie-chart centering and tooltip placement. Incomplete: PHP margin shorthand (margin-block: 80px) not back-compatible with older browsers—use explicit properties if IE11 support required (unlikely given MUI v7).Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how